#coding:utf-8


import tensorflow as tf

a=tf.constant([[1.,2.],[2.3,3.],[-1.,0]])
b=tf.get_variable('v',initializer=tf.random_normal([3,3,3],mean=1,stddev=1))
c=tf.get_variable('w',initializer=tf.random_normal([4,4,4,4],mean=1,stddev=1))

with tf.Session() as sess:
    tf.global_variables_initializer().run()
    print(sess.run(tf.sigmoid(a)))
    print(sess.run(tf.sigmoid(b)))
    print(sess.run(tf.tanh(b)))

    relu=tf.nn.relu
    print('-----------')
    print(sess.run(relu(b)))

   # print('C orign------------------------')
    #print(c.eval())
    print('b orign------------------------')
    print(b.eval())
    print(b.eval()[0][1][2])
    print(b.eval()[1][0][0])

    print('drop 3------------------------')
    drop=tf.nn.dropout(b,keep_prob=0.4,noise_shape=[1,1,3])

    print(sess.run(drop))
    print('drop 1------------------------')
    drop = tf.nn.dropout(b, keep_prob=0.4, noise_shape=[1, 3,1])
    print(sess.run(drop))